home *** CD-ROM | disk | FTP | other *** search
/ Web3D Graphics - Virtual Worlds Created With VRML / Web3D Graphics - Virtual Worlds Created With VRML.iso / List / Chap3 / list3-18a.wrl < prev    next >
Encoding:
Text File  |  2000-12-09  |  1.8 KB  |  62 lines

  1. #VRML V2.0 utf8
  2.  
  3. #ë╞é╠âvâìâgâ^âCâvÉΘî╛
  4. PROTO House[
  5.     field  SFVec3f     position   0 0 0
  6.     field  SFRotation  turn       1 1 0 0.524
  7.     field  SFVec3f     size       1 1 1
  8.     field  SFColor     roofColor  1 0 0
  9.     field  SFColor     bodyColor  0 1 0
  10.     ]{
  11.     Transform{
  12.         translation IS position
  13.         rotation    IS turn
  14.         scale       IS size
  15.         children[
  16.             #ë«ì¬
  17.             Shape{
  18.                 geometry IndexedFaceSet{
  19.                     coord Coordinate{
  20.                         point[
  21.                              0 1  0,
  22.                              1 0  1,
  23.                              1 0 -1,
  24.                             -1 0 -1,
  25.                             -1 0  1
  26.                         ]
  27.                     }
  28.                     coordIndex[
  29.                         0,1,2,-1,
  30.                         0,2,3,-1,
  31.                         0,3,4,-1,
  32.                         0,4,1,-1,
  33.                         1,2,3,4,-1
  34.                     ]
  35.                     solid FALSE
  36.                 }
  37.                 appearance Appearance{
  38.                     material Material{
  39.                         diffuseColor IS roofColor
  40.                     }
  41.                 }
  42.             },
  43.             #ë╞û{æ╠
  44.             Transform{
  45.                 translation 0 -0.5 0
  46.                 children[
  47.                     Shape{
  48.                         geometry Box{
  49.                             size 1.6 1.0 1.6
  50.                         }
  51.                         appearance Appearance{
  52.                             material Material{
  53.                                 diffuseColor IS bodyColor
  54.                             }
  55.                         }
  56.                     }
  57.                 ]
  58.             }
  59.         ]
  60.     }
  61. }
  62.